home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 April / Macworld (1999-04).dmg / Serious Software / Katabounga demo / Katabounga / Katabounga US 2.08 / Katabounga US 2.08.rsrc / TEXT_128_If.txt < prev    next >
Text File  |  1998-12-16  |  885b  |  50 lines

  1. IF    ‚Ķ ELSE ‚Ķ END
  2.  
  3. This is the standard language set up.  It allows you to compare two numeric values in order to execute a comparison of a part of the script. You can also compare two text values.
  4.  
  5. IF A>5
  6.     Execute if true
  7.     ‚Ķ
  8. ELSE
  9.     Execute if false
  10.     ‚Ķ
  11. END
  12.  
  13. Numeric comparators 
  14. <        less than
  15. >        greater than
  16. #        different from 
  17. =        equal to
  18. <=    less than or equal to
  19. >=    greater than or equal to
  20.  
  21. Text comparators
  22. Is                                    If text A is the same than text B
  23. IsNot                         If text A is different from text B
  24. Contains                If text B contains text A
  25. ContainNot         If text B doesnt contain text A
  26.  
  27. Exemples
  28.  
  29. IF MouseH>Objet.Right
  30.     xxx
  31. ELSE
  32.     xxx
  33. END
  34.  
  35. IF TheName Contains "Mountains"
  36.     xxx
  37. ELSE
  38.     xxx
  39. END
  40.  
  41. This can also be produced to test predefined booleans : 
  42. IF Macintosh
  43.     Message GoMac
  44. ELSE
  45.     Message GoIBM
  46. END
  47.  
  48. See : "Predefined variables" for more information on avalaible boolean values.
  49.  
  50.